﻿using System;

namespace diantou.dataModel.sqlMember
{
    /// <summary>
    /// HTTP连接
    /// </summary>
    [fastCSharp.emit.dataSerialize(IsReferenceMember = false, IsMemberMap = false)]
    [fastCSharp.emit.dataMember(DataType = typeof(string))]
    //[fastCSharp.code.cSharp.webView.clientType(Name = "diantou.httpLink", MemberName = null)]
    public partial struct httpLinkEmpty : fastCSharp.emit.sqlTable.ISqlVerify
    {
        /// <summary>
        /// URL原始值
        /// </summary>
        [fastCSharp.code.cSharp.webView.outputAjax]
        public string Value;
        public static implicit operator httpLinkEmpty(string url) { return new httpLinkEmpty { Value = url }; }
        public static implicit operator string(httpLinkEmpty url) { return url.Value; }
        /// <summary>
        /// 是否通过SQL数据验证
        /// </summary>
        /// <returns></returns>
        public bool IsSqlVeify()
        {
            if (Value == null || (Value != string.Empty && !fastCSharp.web.formatHtml.IsHttpOrDefalut(Value))) Value = string.Empty;
            return true;
        }
    }
}
